<?php

require "vendor/autoload.php";
use Pheanstalk\Pheanstalk;

$ph = Pheanstalk::create('127.0.0.1','11301');

$datas = array();
for ($i =0;$i <5;++$i) {
    $data = array([
        'id' => $i,
        'name' => 'name' . $i,
    ]);

    array_push($datas,$data);
}

$job = $ph->useTube('goodLists')->put(json_encode($datas[0]),1024,10,3);
print_r($ph->stats($job));
$job = $ph->useTube('goodLists')->put(json_encode($datas[1]),1023);
print_r($ph->stats($job));
$job = $ph->useTube('goodLists')->put(json_encode($datas[2]),1025);
print_r($ph->stats($job));


